import request from '@/utils/request'

// 查询审批记录列表
export function listCheck(query) {
  return request({
    url: '/workflow/check/approveList',
    method: 'get',
    params: query
  })
}

// 查询审批记录详细
export function getCheck(checkId) {
  return request({
    url: '/workflow/check/' + checkId,
    method: 'get'
  })
}

// 新增审批记录
export function addCheck(data) {
  return request({
    url: '/workflow/check',
    method: 'post',
    data: data
  })
}

// 修改审批记录
export function updateCheck(data) {
  return request({
    url: '/workflow/check',
    method: 'put',
    data: data
  })
}

// 删除审批记录
export function delCheck(checkId) {
  return request({
    url: '/workflow/check/' + checkId,
    method: 'delete'
  })
}

// 导出审批记录
export function exportCheck(query) {
  return request({
    url: '/workflow/check/export',
    method: 'get',
    params: query
  })
}
// 查询日志列表
export function logList(query) {
  return request({
    url: '/workflow/log/list',
    method: 'get',
    params: query
  })
}

// 统计审核记录
export function getCheckCount() {
  return request({
    url: '/workflow/check/getCheckCount',
    method: 'get'
  })
}